//
//  CYTMineTableViewCell.m
//  GaoXunTravel
//
//  Created by Koudai on 2017/6/13.
//  Copyright © 2017年 May. All rights reserved.
//

#import "CYTMineTableViewCell.h"

@implementation CYTMineTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        if (!_arrowImg){
            _arrowImg = [[UIImageView alloc]init];
            _arrowImg.image = [UIImage imageNamed:@"more"];
            _arrowImg.frame = CGRectMake(SCREEN_WIDTH-24, 20, 8, 12);
            [self addSubview:_arrowImg];
        }
        if (!_headImage){
            _headImage = [[UIImageView alloc]init];
            _headImage.frame =CGRectMake(10, 10, 30, 30);
            [self addSubview:_headImage];
        }
        
        if (!_redView) {
            _redView = [[UIView alloc] initWithFrame:CGRectMake(20, 0, 10, 10)];
            _redView.backgroundColor = [UIColor redColor];
            _redView.layer.cornerRadius = 5;
            _redView.layer.masksToBounds = YES;
            _redView.hidden = YES;
            [_headImage addSubview:_redView];
        }
        if (!_titleLabel){
            _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_headImage.frame)+ 10, 10, 120, 30)];
            _titleLabel.font = [UIFont systemFontOfSize:15];
            [self addSubview:_titleLabel];
        }
        
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
